const app = getApp();
Page({
	data: {
		imgpath:app.setting.apiimgpath,
		inputShowed:false,
		inputVal:"",
		typeSellerData:{}
	},
	showInput:function(){
		this.setData({
			inputShowed:true
		});
	},
	hideInput:function(){
		var that = this;
		var param= {operation_id:1};
		if(this.data.inputVal){
			param.title = this.data.inputVal;
		}
		app.request('/api/Seller/getTypeSeller', param, function(res){
			if(res.code == '0'){
				//更新数据
				that.setData({
					typeSellerData:res.data
				});
			}
		});
	},
	clearInput:function(){
		this.setData({
			inputVal:""
		});
	},
	inputTyping:function(e){
		this.setData({
			inputVal:e.detail.value
		});
	},
	onLoad:function(options){
		var that = this;
		app.request('/api/Seller/getTypeSeller', {operation_id:1}, function(res){
			if(res.code == '0'){
				//更新数据
				that.setData({
					typeSellerData:res.data
				});
			}
		});
	}
})